Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not changing local state when parsed value is the same of the previous #90

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lodatol
Copy link

@lodatol lodatol commented Feb 3, 2023

we did this small change to allow user input number like 0.01, with the current implementation this is not possible as 0.00 would be resetted to 0.
Since 1.01 is equal to 1.0100 just skipping the state update when the real values are the same is enough.
In addition I forwarded the original text to the change handler as second parameter, this may be useful for additional logic and would not impact the currents implementations that expect a real number as first parameter of the onChange

we did this small change to address the user input like 0.01 with the current implementation this is not possible as 0.00 would be resetted to 0.
Since 1.01 is equal to 1.0100 just skipping the state update when the real values are the same is enough.
In addition I forwarded the original text to the change handler as second parameter, this may be useful for additional logic and would not impact the currents implementations that expect a real number as first parameter of the onChange
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant